package com.lg.order.producer.controller;

import com.lg.order.producer.entity.MessageEntity;
import com.lg.order.producer.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * @author by Mr. Li 2020/12/11 15:20
 */
@RestController
public class TestController {
    @Autowired
    private MessageService mqMessageService;

    @GetMapping("test")
    public String test() {
        MessageEntity mqMessage = new MessageEntity();
        mqMessage.setMessageId(UUID.randomUUID().toString());
        mqMessageService.save(mqMessage);
        return "ok";
    }
}
